home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / AIncludes / CTBUtilities.a < prev    next >
Text File  |  1996-05-01  |  4KB  |  170 lines

  1. ;
  2. ;    File:        CTBUtilities.a
  3. ;
  4. ;    Contains:    Communications Toolbox Utilities interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.0d3 on Copland DR1
  8. ;
  9. ;    Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10. ;
  11. ;    Bugs?:        If you find a problem with this file, send the file and version
  12. ;                information (from above) and the problem description to:
  13. ;
  14. ;                    Internet:    apple.bugs@applelink.apple.com
  15. ;                    AppleLink:    APPLE.BUGS
  16. ;
  17. ;
  18.     IF &TYPE('__CTBUTILITIES__') = 'UNDEFINED' THEN
  19. __CTBUTILITIES__ SET 1
  20.  
  21.     IF &TYPE('__MEMORY__') = 'UNDEFINED' THEN
  22.     include 'Memory.a'
  23.     ENDIF
  24.     IF &TYPE('__DIALOGS__') = 'UNDEFINED' THEN
  25.     include 'Dialogs.a'
  26.     ENDIF
  27.     IF &TYPE('__APPLETALK__') = 'UNDEFINED' THEN
  28.     include 'AppleTalk.a'
  29.     ENDIF
  30.     IF FOR_SYSTEM7_ONLY THEN
  31.  
  32.                                                             ;    version of Comm Toolbox Utilities    
  33. curCTBUVersion                    EQU        2                    ;    Error codes/types    
  34. ctbuGenericError                EQU        -1
  35. ctbuNoErr                        EQU        0
  36. ; typedef OSErr                         CTBUErr
  37.  
  38.  
  39. chooseDisaster                    EQU        -2
  40. chooseFailed                    EQU        -1
  41. chooseAborted                    EQU        0
  42. chooseOKMinor                    EQU        1
  43. chooseOKMajor                    EQU        2
  44. chooseCancel                    EQU        3
  45. ; typedef unsigned short                 ChooseReturnCode
  46.  
  47.  
  48. nlOk                            EQU        0
  49. nlCancel                        EQU        1
  50. nlEject                            EQU        2
  51. ; typedef unsigned short                 NuLookupReturnCode
  52.  
  53.  
  54. nameInclude                        EQU        1
  55. nameDisable                        EQU        2
  56. nameReject                        EQU        3
  57. ; typedef unsigned short                 NameFilterReturnCode
  58.  
  59.  
  60. zoneInclude                        EQU        1
  61. zoneDisable                        EQU        2
  62. zoneReject                        EQU        3
  63. ; typedef unsigned short                 ZoneFilterReturnCode
  64.  
  65.  
  66.                                                             ;    Values for hookProc items        
  67. hookOK                            EQU        1
  68. hookCancel                        EQU        2
  69. hookOutline                        EQU        3
  70. hookTitle                        EQU        4
  71. hookItemList                    EQU        5
  72. hookZoneTitle                    EQU        6
  73. hookZoneList                    EQU        7
  74. hookLine                        EQU        8
  75. hookVersion                        EQU        9
  76. hookReserved1                    EQU        10
  77. hookReserved2                    EQU        11
  78. hookReserved3                    EQU        12
  79. hookReserved4                    EQU        13                    ;    "virtual" hookProc items    
  80. hookNull                        EQU        100
  81. hookItemRefresh                    EQU        101
  82. hookZoneRefresh                    EQU        102
  83. hookEject                        EQU        103
  84. hookPreflight                    EQU        104
  85. hookPostflight                    EQU        105
  86. hookKeyBase                        EQU        1000
  87. ;     NuLookup structures/constants    
  88. NLTypeEntry                RECORD 0
  89. hIcon                     ds.l    1                ; offset: $0 (0)
  90. typeStr                     ds        Str32            ; offset: $4 (4)
  91.                          ORG 38
  92. sizeof                     EQU *                    ; size:   $26 (38)
  93.                         ENDR
  94. NLType                    RECORD 0
  95. elements                 ds.b    4 * NLTypeEntry.sizeof
  96. sizeof                     EQU *                    ; size:   $98 (152)
  97.                         ENDR
  98.  
  99.  
  100. NBPReply                RECORD 0
  101. theEntity                 ds        EntityName        ; offset: $0 (0)
  102. theAddr                     ds        AddrBlock        ; offset: $66 (102)
  103. sizeof                     EQU *                    ; size:   $6A (106)
  104.                         ENDR
  105. ;
  106. ; pascal CTBUErr InitCTBUtilities(void )
  107. ;
  108.     IF ¨ GENERATINGCFM THEN
  109.         Macro
  110.         _InitCTBUtilities
  111.             move.w              #$0401,-(sp)
  112.             move.l              sp,A0
  113.             dc.w                $A08B
  114.             addq.w              #2,sp
  115.         EndM
  116.     ELSE
  117.         IMPORT_CFM_FUNCTION InitCTBUtilities
  118.     ENDIF
  119.  
  120. ;
  121. ; pascal short CTBGetCTBVersion(void )
  122. ;
  123.     IF ¨ GENERATINGCFM THEN
  124.         Macro
  125.         _CTBGetCTBVersion
  126.             move.w              #$0405,-(sp)
  127.             move.l              sp,A0
  128.             dc.w                $A08B
  129.             addq.w              #2,sp
  130.         EndM
  131.     ELSE
  132.         IMPORT_CFM_FUNCTION CTBGetCTBVersion
  133.     ENDIF
  134.  
  135. ;
  136. ; pascal short StandardNBP(Point where, ConstStr255Param prompt, short numTypes, NLType typeList, NameFilterUPP nameFilter, ZoneFilterUPP zoneFilter, DialogHookUPP hook, NBPReply *theReply)
  137. ;
  138.     IF ¨ GENERATINGCFM THEN
  139.         Macro
  140.         _StandardNBP
  141.             move.w              #$0406,-(sp)
  142.             move.l              sp,A0
  143.             dc.w                $A08B
  144.             addq.w              #2,sp
  145.         EndM
  146.     ELSE
  147.         IMPORT_CFM_FUNCTION StandardNBP
  148.     ENDIF
  149.  
  150. ;
  151. ; pascal short CustomNBP(Point where, ConstStr255Param prompt, short numTypes, NLType typeList, NameFilterUPP nameFilter, ZoneFilterUPP zoneFilter, DialogHookUPP hook, long userData, short dialogID, ModalFilterUPP filter, NBPReply *theReply)
  152. ;
  153.     IF ¨ GENERATINGCFM THEN
  154.         Macro
  155.         _CustomNBP
  156.             move.w              #$0407,-(sp)
  157.             move.l              sp,A0
  158.             dc.w                $A08B
  159.             addq.w              #2,sp
  160.         EndM
  161.     ELSE
  162.         IMPORT_CFM_FUNCTION CustomNBP
  163.     ENDIF
  164.  
  165.     IF OLDROUTINENAMES THEN
  166.     ENDIF
  167.     ENDIF
  168.     ENDIF ; __CTBUTILITIES__ 
  169.  
  170.